package com.ch.web.mq;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;

@Configuration
public class MqCustomConfigure {
    public final static String REGIS_USER = "/register";

    @Lazy
    @Bean(destroyMethod = "destroy")
    public RabbitMqCustomTemplate rabbitMqCustom() {
        RabbitMqProxy proxy = new RabbitMqProxy(new RabbitMqCustomTemplate());
        System.out.println("RabbitMqCustom代理bean创建完毕");
        return (RabbitMqCustomTemplate) proxy.createProxyInstance();
    }
}
